package com.kmxd.ams.client.logs.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 系统操作日志
 *
 * @author ZuoLG
 * @since 2022-09-06
 */
@Data
@Schema(description = "系统操作日志对象")
public class LogSystemVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  @Schema(description = "公司ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long comId;

  @Schema(description = "全宗ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long fondsId;

  @Schema(description = "部门ID")
  private Long deptId;

  @Schema(description = "部门名称")
  private String deptName;

  @Schema(description = "操作模块")
  private String logModule;

  @Schema(description = "操作内容")
  private String logTitle;

  @Schema(description = "日志状态 0成功；1失败")
  private String logStatus;

  @Schema(description = "用户平台 WEB：WEB管理后台；APP：前端用户平台")
  private String userPlatform;

  @Schema(description = "请求地址")
  private String requsetUri;

  @Schema(description = "请求方式")
  private String requsetType;

  @Schema(description = "请求方法")
  private String requsetMethod;

  @Schema(description = "请求参数")
  private String requsetParams;

  @Schema(description = "返回参数")
  private String responseResult;

  @Schema(description = "请求耗时")
  private String requsetTime;

  @Schema(description = "异常信息")
  private String exception;

  @Schema(description = "操作人员")
  private String operName;

  @Schema(description = "IP地址")
  private String ipAddress;

  @Schema(description = "操作地点")
  private String operLocation;

  @Schema(description = "浏览器类型")
  private String browser;

  @Schema(description = "操作系统")
  private String os;

  @Schema(description = "日志安全等级：0低，1中，2高，3高危")
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer level;

  @Schema(description = "备注")
  private String remarks;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @Schema(description = "用户id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long createBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;
}
